import request from '@/utils/request.js'

export const uploadImage = (data) => {
  return request({
    method: 'POST',
    url: '/mp/v1_0/user/images',
    data: data
  })
}

export const getImages = (params) => {
  return request({
    method: 'GET',
    url: '/mp/v1_0/user/images',
    params: params
  })
}

export const collectImage = (imageId, collect) => {
  return request({
    method: 'PUT',
    url: '/mp/v1_0/user/images/' + imageId,
    data: { collect: collect }
  })
}

export const deleteImage = (imageId) => {
  return request({
    method: 'DELETE',
    url: '/mp/v1_0/user/images/' + imageId
  })
}
